<!doctype html>
<html>

<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>添加</title>
<meta name="description" content="这是一个 index 页面">
<meta name="keywords" content="index">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="renderer" content="webkit">
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link rel="icon" type="image/png" href="${ctx}/static/i/favicon.png">
<link rel="apple-touch-icon-precomposed"
	href="${ctx}/static/i/app-icon72x72@2x.png">
<meta name="apple-mobile-web-app-title" content="Amaze UI" />
<link rel="stylesheet"
	href="${ctx}/static/css/amazeui.min.css" />
<link rel="stylesheet"
	href="${ctx}/static/css/admin.css">
<link rel="stylesheet" href="${ctx}/static/css/app.css">
<link rel="stylesheet" href="${ctx}/static/css/main.css">
<link rel="stylesheet"
	href="${ctx}/static/ztree/zTreeStyle.css">
<style type="text/css">
.return {
	width: 20px;
	margin-right: 10px;
}
body ol.am-breadcrumb {
      padding-top:0;
      margin:0;
      margin-bottom:10px;
}
.am-form-group {
	position: relative;
}

.chance {
	display: inline-block;
	position: absolute;
	width: 100px;
	z-index: 99;
	top: 28px;
	height: 35px;
	right: 0;
	color: #fff;
	background: #3bb4f2;
}

.bottomdiv {
	width: 100%;
	position: absolute;
	bottom: 0;
	left: 0;
	background: #d3d3d3;
	padding: 5px 0;
}

.bottomdiv button {
	float: right;
	margin-right: 30px;
}
</style>
</head>

<body data-type="generalComponents">
	<ol class="am-breadcrumb">
		<img src="${ctx}/static/img/return.png" class="return" />
		<li><a href="#" class="am-icon-home">首页</a></li>
		<li><a href="${ctx}/user">用户管理</a></li>
		<li class="am-active">添加用户</li>
	</ol>
	<div class="tpl-portlet-components">
		<div class="portlet-title">
			<div class="caption font-green bold">
				<span class="am-icon-code"></span>添加用户信息
			</div>
		</div>
		<div class="tpl-block ">
			<div class="am-g tpl-amazeui-form" style="text-align: center;">
				<div
					style="width: 75%; margin: 0 auto; text-align: left; font-size: 14px;">
					<form  class="am-form" data-href="${ctx}/user/create" id="doc-vld-msg">
						<fieldset>
							<div class="am-form-group">
								<label for="doc-vld-name-2-1">用户名：</label>
								 <input type="text" name="username" id="doc-vld-name-2-1" minlength="2" value="" placeholder="输入用户名（至少 2个字符）" required />
							</div>
							<div class="am-form-group">
								<label for="doc-vld-name-2-1">密码：</label>
								 <input type="password" name="password" id="doc-vld-name-2-3" minlength="6" value="" placeholder="输入密码（至少 6个字符）" required />
							</div>
							<div class="am-form-group">
								<label for="doc-vld-name-2-1">真实姓名：</label>
								 <input type="text" name="name" id="doc-vld-name-2-2" minlength="2" placeholder="输入真实姓名" required />
							</div>
							<div class="am-form-group">
							<label>性别： </label> 
						      <label class="am-radio-inline">
						        <input type="radio"  value="男" name="sex" checked>男
						      </label>
						      <label class="am-radio-inline">
						        <input type="radio"  value="女" name="sex">女
						      </label>
						    </div>
							<div class="am-form-group">
								<label for="doc-vld-age-2-1">年龄：</label> <input type="number"
									class="" name="age" id="doc-vld-age-2-1" placeholder="输入年龄  12-120"
									min="12" max="120" required />
							</div>
							<div class="am-form-group">
                                    <label for="doc-vld-date-2-1">出生日期:</label>
									<input type="text" class="am-form-field" name="birthday" placeholder="出生日期" data-am-datepicker readonly required/>
                                  </div>
							<div class="am-form-group">
								<label for="doc-vld-age-2-1">手机号：</label> <input type="number" name="phoneNumber" maxlength="11" minlength="11" pattern="^1(3|4|5|6|7|8)[0-9]\d{8}$" data-validation-message="输入正确11位手机号" placeholder="手机号"
									required />
							</div>
								<div class="am-form-group">
                                <label for="doc-vld-email-2-1">邮箱：</label>
                                <input type="email"  id="doc-vld-email-2-1" data-validation-message="输入地球上的电子邮箱" placeholder="输入邮箱" required/>
                            </div> 
							<div class="am-form-group">
								<label for="">身份证号：</label> 	
								<input type="text"  name="idCard" minlength="18"maxlength="18" data-validation-message="输入正确身份证号"  placeholder="身份证号" required />
							</div>
						
                            <div class="am-form-group">
                                    <label for="doc-select-1-1">身份类型：</label>
                                    <select id="doc-select-1-1" name="userType" >
                                   		<option value="3" selected="selected">普通用户</option>
                                        <option value="2">会员</option>
                                        <option value="1" >管理员</option>
                                    </select>
                                    <span class="am-form-caret"></span>
                                  </div>
							<button id="crea" type="submit" class="am-btn am-btn-secondary qued">确定</button>
							
						</fieldset>
					</form>
				</div>
			</div>
		</div>

	</div>

	<script type="text/javascript"
		src="${ctx}/static/js/jquery.min.js"></script>
	<script type="text/javascript"
		src="${ctx}/static/js/amazeui.min.js"></script>
	<script type="text/javascript"
		src="${ctx}/static/js/app.js"></script>
	<script type="text/javascript"
		src="${ctx}/static/js/form.js"></script>
	<script type="text/javascript"
		src="${ctx}/static/js/distpicker.data.min.js"></script>
	<script type="text/javascript"
		src="${ctx}/static/js/distpicker.min.js"></script>
	<script type="text/javascript"
		src="${ctx}/static/ztree/jquery.ztree.all.min.js"></script>
	<script type="text/javascript"
		src="${ctx}/static/ztree/jquery.ztree.core.min.js"></script>
	<script type="text/javascript"
		src="${ctx}/static/ztree/jquery.ztree.excheck.min.js"></script>
	<script type="text/javascript"
		src="${ctx}/static/ztree/jquery.ztree.exedit.min.js"></script>
	<script type="text/javascript"
		src="${ctx}/static/ztree/jquery.ztree.exhide.min.js"></script>
	<script src="${ctx}/static/js/public.js"></script>	
	<script>
		$(".return").click(function() {//返回上一页
			history.go(-1);
		});
		$(document).ready(function() {
	 		$('#doc-vld-msg').submit(function() {
	 			  var num =  $(".am-field-error").length; 
	 			if(num==0){
	 				var urls=$("#doc-vld-msg").attr("data-href");
	 				ajaxForm(urls);
	 			}
	 			return false;
			}); 
		});
	 			
	</script>
</body>

</html>